def shi():
    print('静夜思---李白')
    print('床前明月光，疑是地上霜')
    print('举头望明月，低头思故乡')


shi()


def add():
    a, b = 6, 7
    s = a * b
    print('a和b的积为：', s)
    return a + b


c = add()
print(c)


def add(a, b):
    print(a + b)


add(1, 3)

c = 7
d = 9
add(c, d)

add(4 * 5, 9 % 3)

e = 0
add(8, e * 4 + 3)


def sc(a, b, c):
    print('张三成绩为：', a)
    print('李四成绩为：', b)
    print('王五成绩为：', c)


sc(30, 52, 98)
sc(b=52, c=98, a=30)


def reg(name, age, sex='女'):
    print('姓名,{} 年龄,{} 性别,{}'.format(name, age, sex))

reg('小丽', 20)
reg('小张', 21, '男')

def rectangle():
    a = int(input('请输入矩形的长(整数值)：'))
    b = int(input('请输入矩形的宽(整数值)：'))
    s = a*b
    c = 2*(a+b)
    print('该矩形面积为：', s)
    print('该矩形周长为：', c)
rectangle()

def fav(*fr):
    print('我喜欢的水果有')
    for i in fr:
        print(i)

fav('苹果')
fav('苹果', '香蕉', '芒果')
fav('苹果', '西瓜', '橙子', '榴莲', '草莓')

def show(a,b,*l):
    print(a)
    print(b)
    print(l)

show(1, 2,4, 5, 6, 7, 9, 56)

def re(a,b,c,d):
    return a+b, c*d, a-c

ss = re(1,2,3,4)
print(ss)

def fu():
    a = 20
    return a

a = 1
print(a)
c = fu()
print(c)